; Music of OutLaws (1990) (Players)
; Ripped by Megachur the 16/08/2008

	write "OUTLAWS.BIN"

music_date_rip	equ &1088
music_adr	equ &3e00
first_theme	equ 0
last_theme	equ 4

	read "music_header_v1_0.asm"

	jp l4417	; init music
	jp l44fe	; play music
.l3e08 equ $ + 2
.music_end equ $ + 1
.l3e07 equ $ + 1
.l3e06
	db #01,#01,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#ff,#00,#00,#00,#01
	db #00,#0c,#00,#0c,#00,#00,#18,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#0f,#08
	db #00,#ff,#0c,#05,#00,#ff,#ff,#00
	db #00,#01,#02,#f4,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#0f,#0f,#00,#fe,#0d,#01,#00
	db #ff,#ff,#00,#00,#03,#06,#00,#fc
	db #f4,#f4,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#d8,#00
	db #00,#00,#00,#00,#0d,#0a,#00,#ff
	db #0a,#0f,#06,#ff,#ff,#00,#00,#00
	db #03,#00,#04,#07,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#0f
	db #0f,#00,#00,#0f,#00,#00,#fb,#ff
	db #00,#00,#03,#04,#1a,#18,#16,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#78,#00,#00,#00
	db #00,#00,#0c,#0c,#00,#fe,#0a,#01
	db #00,#ff,#ff,#00,#00,#03,#06,#06
	db #fa,#02,#fe,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#dc
	db #00,#00,#00,#00,#00,#0f,#04,#01
	db #ff,#0c,#50,#08,#ff,#ff,#00,#00
	db #00,#01,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #0f,#0a,#00,#ff,#0c,#0f,#06,#ff
	db #ff,#00,#00,#00,#03,#00,#04,#07
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00
.l3f20
	dw l3f5a,l3f75,l4016,l403b
	dw l4042,l4051,l4054,l405d
	dw l4062,l4067,l406e,l4073
.l3f38
	dw l407e,l4085,l4094,l40a3
	dw l40b2,l40c7,#0000,l415e
	dw l4193,l41b6,l41df,l4220
	dw l4289,l4294,l42a1,l42b4
	dw l42cb
.l3f5a
	db #fc,#00,#fb,#18,#0a,#02,#05,#01
	db #0b,#02,#05,#01,#0b,#01,#fa,#fb
	db #0b,#01,#fa,#fe,#0b,#01,#fa,#07
.l3f75 equ $ + 3
	db #00,#01,#fe,#01,#02,#02,#02,#01
	db #02,#03,#01,#02,#01,#03,#01,#02
	db #01,#01,#02,#02,#02,#01,#02,#03
	db #01,#02,#01,#03,#01,#02,#01,#01
	db #02,#02,#02,#01,#02,#03,#01,#02
	db #01,#03,#01,#02,#01,#01,#02,#02
	db #02,#01,#02,#03,#01,#02,#01,#03
	db #01,#02,#01,#01,#04,#02,#02,#01
	db #02,#03,#01,#02,#01,#03,#01,#02
	db #01,#01,#02,#02,#02,#01,#02,#03
	db #01,#02,#01,#03,#01,#02,#01,#01
	db #02,#02,#02,#01,#02,#03,#01,#02
	db #01,#03,#01,#02,#01,#01,#02,#02
	db #02,#01,#02,#03,#01,#02,#01,#03
	db #01,#02,#01,#01,#04,#02,#02,#01
	db #02,#03,#01,#02,#01,#03,#01,#02
	db #01,#fa,#fb,#01,#02,#02,#02,#01
	db #02,#03,#01,#02,#01,#03,#01,#02
	db #01,#fa,#fe,#01,#02,#02,#02,#01
	db #02,#03,#01,#02,#01,#03,#01,#02
.l4016 equ $ + 4
	db #01,#fa,#07,#fd,#08,#09,#09,#01
	db #07,#09,#09,#01,#07,#0b,#08,#02
	db #09,#01,#07,#17,#09,#01,#07,#03
	db #09,#01,#07,#0f,#09,#01,#07,#05
	db #09,#01,#07,#1d,#09,#01,#00,#01
.l403b equ $ + 1
	db #fe,#fc,#00,#fb,#18,#0a,#01,#fe
.l4042
	db #01,#02,#02,#02,#01,#02,#03,#01
.l4051 equ $ + 7
	db #02,#01,#03,#01,#02,#01,#fe,#04
.l4054 equ $ + 2
	db #01,#fe,#fc,#00,#fb,#18,#0f,#01
.l405d equ $ + 3
	db #00,#01,#ff,#0e,#01,#00,#01,#ff
.l4067 equ $ + 5
.l4062
	db #10,#01,#00,#01,#ff,#fc,#00,#fb
.l406e equ $ + 4
	db #18,#0c,#01,#ff,#0d,#01,#00,#01
.l4073 equ $ + 1
	db #fe,#fa,#f4,#0c,#01,#00,#01,#fa
.l407e equ $ + 4
	db #0c,#00,#01,#fe,#61,#00,#19,#10
.l4085 equ $ + 3
	db #60,#10,#fe,#61,#01,#2a,#0c,#36
	db #06,#2a,#0c,#2a,#06,#36,#06,#25
.l4094 equ $ + 2
	db #06,#fe,#61,#01,#2c,#0c,#38,#06
	db #2c,#0c,#2c,#06,#38,#06,#27,#06
.l40a3 equ $ + 1
	db #fe,#61,#01,#2e,#0c,#3a,#06,#2e
	db #0c,#2e,#06,#3a,#06,#29,#06,#fe
.l40b2
	db #61,#04,#19,#06,#19,#06,#61,#02
	db #19,#06,#61,#04,#19,#0c,#19,#06
.l40c7 equ $ + 5
	db #61,#02,#19,#0c,#fe,#61,#06,#41
	db #06,#3d,#06,#3d,#12,#60,#12,#60
	db #12,#60,#12,#3a,#0c,#38,#12,#60
	db #12,#60,#12,#60,#12,#60,#0c,#3a
	db #0c,#41,#06,#3d,#06,#3d,#12,#60
	db #12,#60,#12,#60,#12,#41,#0c,#46
	db #12,#60,#12,#48,#06,#49,#06,#48
	db #12,#60,#12,#60,#03,#44,#09,#46
	db #12,#60,#12,#48,#06,#49,#06,#4b
	db #12,#49,#12,#48,#0c,#46,#06,#42
	db #06,#42,#12,#60,#12,#60,#12,#60
	db #12,#60,#0c,#44,#06,#41,#06,#41
	db #12,#60,#12,#3f,#12,#60,#12,#60
	db #0c,#41,#06,#3d,#06,#3d,#12,#60
	db #12,#60,#12,#60,#12,#41,#0c,#46
	db #12,#60,#0c,#60,#12,#48,#12,#60
	db #0c,#60,#12,#49,#12,#60,#12,#60
	db #0c,#48,#12,#60,#12,#60,#0c,#46
	db #12,#60,#12,#60,#12,#60,#12,#60
.l415e equ $ + 4
	db #12,#60,#06,#fe,#61,#04,#19,#03
	db #61,#05,#49,#03,#49,#03,#49,#03
	db #61,#02,#19,#03,#61,#05,#49,#03
	db #61,#04,#19,#03,#61,#05,#49,#03
	db #61,#04,#19,#03,#61,#05,#49,#03
	db #49,#03,#49,#03,#61,#02,#19,#03
	db #61,#05,#49,#03,#49,#03,#49,#03
.l4193 equ $ + 1
	db #fe,#61,#00,#19,#03,#49,#03,#49
	db #03,#49,#03,#19,#03,#49,#03,#19
	db #03,#49,#03,#19,#03,#49,#03,#49
	db #03,#49,#03,#19,#03,#49,#03,#49
.l41b6 equ $ + 4
	db #03,#49,#03,#fe,#61,#00,#19,#03
	db #49,#03,#49,#03,#49,#03,#19,#03
	db #49,#03,#19,#03,#49,#03,#19,#03
	db #49,#03,#49,#03,#49,#03,#61,#02
	db #19,#03,#19,#03,#61,#04,#19,#03
.l41df equ $ + 5
	db #61,#02,#19,#03,#fe,#61,#03,#4e
	db #12,#60,#0c,#60,#06,#49,#0c,#4e
	db #12,#60,#12,#49,#0c,#50,#12,#60
	db #12,#4b,#0c,#50,#12,#60,#12,#4b
	db #0c,#4e,#12,#60,#12,#49,#0c,#4e
	db #12,#60,#12,#49,#0c,#52,#12,#60
	db #12,#4d,#0c,#50,#12,#60,#12,#4d
	db #0c,#52,#12,#60,#12,#4d,#0c,#50
.l4220 equ $ + 6
	db #12,#60,#12,#4d,#0c,#fe,#61,#07
	db #42,#03,#42,#03,#42,#0c,#3d,#0c
	db #42,#12,#42,#03,#42,#03,#42,#0c
	db #42,#0c,#42,#0c,#3d,#0c,#44,#03
	db #44,#03,#44,#0c,#3f,#0c,#44,#0c
	db #44,#0c,#44,#03,#44,#03,#3f,#0c
	db #44,#0c,#42,#03,#42,#03,#42,#12
	db #60,#12,#60,#06,#42,#03,#42,#03
	db #42,#12,#60,#12,#60,#06,#46,#03
	db #46,#03,#46,#12,#41,#12,#46,#12
	db #44,#03,#44,#03,#44,#0c,#3f,#0c
	db #44,#0c,#46,#03,#46,#03,#46,#0c
	db #41,#0c,#46,#12,#44,#03,#44,#03
.l4289 equ $ + 7
	db #44,#0c,#3f,#0c,#44,#12,#fe,#61
	db #01,#2a,#0f,#25,#06,#1e,#12,#60
.l4294 equ $ + 2
	db #12,#fe,#61,#03,#42,#0f,#3d,#06
.l42a1 equ $ + 7
	db #61,#07,#42,#12,#60,#12,#fe,#61
	db #01,#25,#09,#22,#03,#22,#03,#22
	db #03,#25,#09,#2a,#09,#25,#13,#60
.l42b4 equ $ + 2
	db #09,#fe,#61,#07,#49,#09,#61,#00
	db #49,#09,#61,#07,#49,#09,#61,#00
	db #49,#12,#61,#07,#49,#09,#49,#12
.l42cb equ $ + 1
	db #fe,#61,#05,#19,#09,#3d,#09,#19
	db #09,#3d,#09,#19,#09,#3d,#09,#3d
.l42e0 equ $ + 6
.l42df equ $ + 5
.l42de equ $ + 4
	db #12,#60,#03,#fe,#00,#00,#00,#00
	db #00,#00,#00,#00,#30,#30,#30,#30
.l42ef equ $ + 5
.l42ee equ $ + 4
.l42ed equ $ + 3
.l42ec equ $ + 2
.l42eb equ $ + 1
	db #00,#0f,#00,#00,#00,#00,#00
.l42f1
	ld a,(l42ed)
	and a
	ld b,a
	ret z
	ld a,(l42ef)
	cp #80
	jp z,l431a
	ld a,(l42ee)
	dec a
	ld (l42ee),a
	ret nz
	ld a,(l42ef)
	ld (l42ee),a
	ld a,(l42eb)
	add b
	bit 4,a
	jp nz,l4329
	ld (l42eb),a
	ret
.l431a
	ld a,b
	cp #01
	ld a,#0f
	jp z,l4323
	xor a
.l4323
	ld (l42eb),a
	jp l4329
.l4329
	xor a
	ld (l42ed),a
	ld a,(l42ec)
	and a
	jp nz,l44ca
	ret
.l4335
	ld a,#00
	ld (l42eb),a
	ld a,#01
.l433c
	ld (l42ed),a
	inc hl
	ld a,(hl)
	ld (l42ef),a
	ld (l42ee),a
	inc hl
	ret
.l4349
	ld a,#0f
	ld (l42eb),a
	ld a,#ff
	jp l433c
.l4353
	ld a,h
	push af
	ld c,l
	cp #07
	jp nz,l435f
	res 7,c
	res 6,c
.l435f
	ld a,#c0
	ld b,#f6
	out (c),a
	ld b,#f4
	pop af
	out (c),a
	ld b,#f6
	ld a,#80
	out (c),a
	ld b,#f4
	out (c),c
	xor a
	ld b,#f6
	out (c),a
	ret
.l4381 equ $ + 7
.l4380 equ $ + 6
.l437b equ $ + 1
.l437a
	db #00,#01,#00,#00,#00,#00,#00,#f8
.l4387 equ $ + 5
.l4385 equ $ + 3
.l4384 equ $ + 2
.l4383 equ $ + 1
.l4382
	db #0f,#0f,#0f,#00,#00,#00,#00,#00
	db #0c,#05,#00,#08,#01,#ff,#00,#00
	db #00,#01,#08,#00,#00,#04,#00,#00
	db #00,#00,#00,#f7,#14,#0a,#01,#00
	db #00,#08,#04,#00,#00,#01,#00,#00
	db #00,#0a,#00,#02,#00,#fe,#00,#00
.l43b6 equ $ + 4
.l43b4 equ $ + 2
.l43b2
	db #00,#00,#00,#00,#00,#00,#00,#0f
	db #01,#01,#02,#01,#ff,#00,#00,#02
	db #03,#09,#00,#00,#01,#00,#00,#00
	db #00,#00,#ef,#ff,#ff,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
.l43e1 equ $ + 7
	db #00,#00,#00,#00,#00,#00,#00,#00
.l43e5 equ $ + 3
.l43e3 equ $ + 1
	db #00,#00,#00,#00,#00,#00,#0f,#0a
	db #01,#02,#02,#ff,#00,#00,#04,#05
	db #0a,#00,#00,#00,#01,#00,#00,#00
	db #00,#00,#df,#ff,#ff,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
.l4410 equ $ + 6
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00
;
.real_init_music
.l4417
;
	ld a,#0f
	ld (l42eb),a
	xor a
	ld (l42ed),a
	ld (l42ec),a
	call l44d2
	ld a,(l42df)
	cp #ff
	jp nz,l4432
	inc a
	ld (l42df),a
.l4432
	ld a,#01
	ld (l4387),a
	ld (l43b6),a
	ld (l43e5),a
	xor a
	ld (l42de),a
	push ix
	ld ix,l4385
	ld a,(l42df)
	add a
	ld b,a
	add a
	add b
	ld l,a
	ld h,#00
	ld de,l3f20
	add hl,de
	ld (l4463),hl
	inc hl
	inc hl
	ld (l446d),hl
	inc hl
	inc hl
	ld (l4477),hl
.l4463 equ $ + 1
	ld hl,(#0000)
	call l449c
	ld ix,l43b4
.l446d equ $ + 1
	ld hl,(#0000)
	call l449c
	ld ix,l43e3
.l4477 equ $ + 1
	ld hl,(#0000)
	call l449c
	ld a,#01
	ld (l3e07),a
	ld h,#07
	ld l,#f8
	call l4353
	ld a,(l42df)
	cp #01
	pop ix
	ret
.l4490	; test player
	halt
	call l44fe
	ld a,(l3e07)
	and a
	jp nz,l4490
	ret
.l449c
	ld (ix+#20),l
	ld (ix+#23),l
	ld (ix+#00),l
	ld (ix+#21),h
	ld (ix+#24),h
	ld (ix+#01),h
	call l49b0
	ld (ix+#02),#01
	ld (ix+#0c),#00
	ld (ix+#05),#00
	ld (ix+#04),#00
	ld (ix+#17),#00
	ld (ix+#2b),#00
	ret
.l44ca
	call l44d2
	xor a
	ld (l3e07),a
	ret
.l44d2
	ld h,#07
	ld l,#ff
	call l4353
	ld hl,l437a
	ld de,l437b
	ld bc,#000a
	ld (hl),#00
	ldir
	ld a,#f8
	ld (l4381),a
.l44eb
	ld b,#0b
	ld h,#00
	ld de,l437a
.l44f2
	ld a,(de)
	ld l,a
	push bc
	call l4353
	pop bc
	inc h
	inc de
	djnz l44f2
	ret
;
.play_music
.l44fe
;
	ld a,(l3e06)
	and a
	jp z,l4536
	ld b,a
	xor a
	ld (l3e06),a
	ld a,b
	cp #ff
	jp z,l44ca
	cp #fe
	jp nz,l452f
	ld b,#0a
	ld a,#01
	ld (l42ec),a
	call l4522
	jp l4536
.l4522
	ld a,#ff
	ld (l42ed),a
	ld a,b
	ld (l42ef),a
	ld (l42ee),a
	ret
;
.init_music
.l452f
;
	dec a
	ld (l42df),a
	jp l4417
.l4536
	call l42f1
	ld a,(l3e07)
	and a
	jr z,l4598
	push ix
	ld ix,l4385
	bit 7,(ix+#0c)
	call z,l4599
	ld ix,l43b4
	bit 7,(ix+#0c)
	call z,l4599
	ld ix,l43e3
	bit 7,(ix+#0c)
	call z,l4599
	ld a,(l42eb)
	cpl
	and #0f
	ld b,a
	ld a,(l42de)
	and a
	ld a,#10
	jp nz,l457a
	ld a,(l4382)
	sub b
	jp nc,l457a
	xor a
.l457a
	ld (l4382),a
	ld a,(l4383)
	sub b
	jp nc,l4585
	xor a
.l4585
	ld (l4383),a
	ld a,(l4384)
	sub b
	jp nc,l4590
	xor a
.l4590
	ld (l4384),a
	call l44eb
	pop ix
.l4598
	ret
.l4599
	ld a,(ix+#02)
	dec (ix+#02)
	jp z,l4740
.l45a2
	ld a,(ix+#0c)
	and #03
	jp z,l4662
	cp #01
	jp z,l45bc
	cp #02
	jp z,l45fc
	cp #03
	jp z,l4646
	jp l4693
.l45bc
	ld a,(ix+#0b)
	and a
	jr z,l45c8
	dec (ix+#0b)
	jp l4693
.l45c8
	ld a,(ix+#04)
	ld b,(ix+#08)
	add b
	ld (ix+#04),a
	ld b,(ix+#05)
	cp b
	jr z,l45e9
	jr nc,l45e3
	ld a,(ix+#07)
	ld (ix+#0b),a
	jp l4693
.l45e3
	ld a,(ix+#05)
	ld (ix+#04),a
.l45e9
	ld a,(ix+#0c)
	and #fc
	or #02
	ld (ix+#0c),a
	ld a,(ix+#09)
	ld (ix+#25),a
	jp l4693
.l45fc
	ld a,(ix+#25)
	and a
	jr z,l4608
	dec (ix+#25)
	jp l4693
.l4608
	ld a,(ix+#04)
	ld b,(ix+#0a)
	add b
	ld (ix+#04),a
	bit 7,a
	jp nz,l4627
	ld b,(ix+#26)
	cp b
	jr z,l4634
	jr c,l462e
	ld a,(ix+#09)
	ld (ix+#25),a
	jr l4693
.l4627
	ld (ix+#04),#00
	jp l4634
.l462e
	ld a,(ix+#26)
	ld (ix+#04),a
.l4634
	ld a,(ix+#0c)
	and #fc
	or #03
	ld (ix+#0c),a
	ld a,(ix+#06)
	ld (ix+#27),a
	jr l4693
.l4646
	ld a,(ix+#27)
	and a
	jr z,l4651
	dec (ix+#27)
	jr l4693
.l4651
	ld a,(ix+#0c)
	and #fc
	ld (ix+#0c),a
	ld a,(ix+#2a)
	ld (ix+#29),a
	jp l4693
.l4662
	ld a,(ix+#29)
	and a
	jr z,l466d
	dec (ix+#29)
	jr l4693
.l466d
	ld a,(ix+#04)
	ld b,(ix+#28)
	add b
	ld (ix+#04),a
	bit 7,a
	jr nz,l4683
	ld a,(ix+#2a)
	ld (ix+#29),a
	jr l4693
.l4683
	ld (ix+#04),#00
	ld a,(ix+#0c)
	and #fc
	or #03
	ld (ix+#0c),a
	jr l4693
.l4693
	ld a,(ix+#04)
	ld hl,l437a
	ld d,#00
	ld e,(ix+#0f)
	add hl,de
	ld (hl),a
	ld h,(ix+#14)
	ld l,(ix+#13)
	ld d,#00
	ld e,(ix+#10)
	add hl,de
	ld a,(ix+#03)
	push af
	ld a,(hl)
	add (ix+#03)
	ld (ix+#03),a
	call l47d7
	pop af
	ld (ix+#03),a
	inc (ix+#10)
	ld a,(ix+#12)
	xor (ix+#10)
	jr nz,l46cf
	ld a,(ix+#11)
	ld (ix+#10),a
.l46cf
	ld a,(ix+#1a)
	cp #ff
	jr z,l4710
	and a
	jr z,l46de
	dec (ix+#1a)
	jr nz,l4710
.l46de
	dec (ix+#1f)
	jr nz,l46f1
	ld a,(ix+#1e)
	ld (ix+#1f),a
	ld a,(ix+#2e)
	xor #01
	ld (ix+#2e),a
.l46f1
	ld b,#00
	ld c,(ix+#1b)
	ld h,(ix+#1d)
	ld l,(ix+#1c)
	bit 0,(ix+#2e)
	jr z,l4705
	add hl,bc
	jr l4707
.l4705
	sbc hl,bc
.l4707
	ld (ix+#1d),h
	ld (ix+#1c),l
	call l472b
.l4710
	ld a,(ix+#2b)
	call l471e
	and a
	call nz,l472b
	ld a,(ix+#02)
	ret
.l471e
	ld l,a
	ld h,#00
	bit 7,a
	ret z
	ld d,h
	ld e,l
	sbc hl,de
	sbc hl,de
	ret
.l472b
	ld b,h
	ld c,l
	ld hl,l437a
	ld d,#00
	ld e,(ix+#0d)
	add hl,de
	ld e,(hl)
	inc hl
	ld d,(hl)
	ex de,hl
	add hl,bc
	ex de,hl
	ld (hl),d
	dec hl
	ld (hl),e
	ret
.l4740
	ld l,(ix+#00)
	ld h,(ix+#01)
.l4746
	ld a,(hl)
	cp #60
	jp z,l47d5
	cp #61
	jp z,l489a
	cp #62
	jp z,l4878
	cp #64
	jp z,l4826
	cp #65
	jp z,l486a
	cp #fa
	jp z,l483d
	cp #fc
	jp z,l4335
	cp #fd
	jp z,l4349
	cp #fe
	jp z,l487c
	cp #ff
	jp z,l4862
	ld b,a
	ld a,(ix+#0c)
	and #fc
	or #01
	ld (ix+#0c),a
	ld (ix+#10),#00
	ld (ix+#04),#00
	ld a,b
	sub (ix+#2d)
	ld (ix+#03),a
	ld a,(ix+#19)
	ld (ix+#1a),a
	ld a,(ix+#1e)
	srl a
	ld (ix+#1f),a
	ld (ix+#1d),#00
	ld (ix+#1c),#00
.l47a9
	inc hl
	ld a,(hl)
	dec a
	push hl
	ld h,#00
	ld l,a
	ld de,(l42e0)
	add hl,de
	ld a,(hl)
	pop hl
	inc hl
	ld b,(ix+#2c)
	add b
	ld (ix+#2c),#00
	ld (ix+#02),a
	ld a,(ix+#07)
	ld (ix+#0b),a
	ld (ix+#00),l
	ld (ix+#01),h
	call l47d7
	jp l45a2
.l47d5
	jr l47a9
.l47d7
	ld a,(ix+#17)
	and a
	call nz,l481b
	ld a,(ix+#03)
	inc a
	inc a
	add a
	ld d,#00
	ld e,a
	ld hl,l4a14
	add hl,de
	push hl
	ld c,(hl)
	inc hl
	ld b,(hl)
	ld hl,l437a
	ld d,#00
	ld e,(ix+#0d)
	add hl,de
	ld (hl),c
	inc hl
	ld (hl),b
	pop hl
	ld a,(l42de)
	and a
	ret z
	ld a,(ix+#0f)
	cp #08
	ret nz
	ld de,#00c0
	add hl,de
	ex de,hl
	ld h,#0b
	ld a,(de)
	ld l,a
	call l4353
	inc de
	inc h
	ld a,(de)
	ld l,a
	call l4353
	ret
.l481b
	ld a,(ix+#03)
	neg
	and #1f
	ld (l4380),a
	ret
.l4826
	inc hl
	ld a,(hl)
	inc hl
	ld (l4380),a
	jp l4891
.l482f
	inc hl
	ld a,(hl)
	inc hl
	ld b,a
	xor a
	ld (l42ec),a
	call l4522
	jp l49b6
.l483d
	inc hl
	ld (ix+#2e),#01
	ld a,(hl)
	ld (ix+#19),a
	inc hl
	ld a,(hl)
	bit 7,a
	jp z,l4853
	neg
	ld (ix+#2e),#00
.l4853
	ld (ix+#1b),a
	ld (ix+#1e),#ff
	ld (ix+#1f),#ff
	inc hl
	jp l4891
.l4862
	inc hl
	ld (ix+#04),#00
	jp l4891
.l486a
	inc hl
	ld a,(hl)
	inc hl
	push hl
	ld h,#0d
	ld l,a
	call l4353
	pop hl
	jp l4891
.l4878
	inc hl
	jp l4891
.l487c
	ld a,(ix+#22)
	dec a
	ld (ix+#22),a
	jr nz,l488b
	jp l49a2
	jp l4746
.l488b
	ld l,(ix+#15)
	ld h,(ix+#16)
.l4891
	ld (ix+#01),h
	ld (ix+#00),l
	jp l4746
.l489a
	inc hl
	ld a,(hl)
	inc hl
	push hl
	ld (ix+#00),l
	ld (ix+#01),h
	ld b,a
	add a
	ld h,#00
	ld l,a
	add hl,hl
	add hl,hl
	add hl,hl
	add hl,hl
	ld de,l3e08
	add hl,de
	ld d,#00
	add b
	ld e,a
	add hl,de
	ld a,(hl)
	ld (ix+#07),a
	inc hl
	ld a,(hl)
	ld (ix+#05),a
	inc hl
	ld a,(hl)
	ld (ix+#08),a
	inc hl
	ld a,(hl)
	ld (ix+#09),a
	inc hl
	ld a,(hl)
	ld (ix+#0a),a
	inc hl
	ld a,(hl)
	ld (ix+#26),a
	inc hl
	ld a,(hl)
	ld (ix+#06),a
	inc hl
	ld a,(hl)
	ld (ix+#2a),a
	inc hl
	ld a,(hl)
	ld (ix+#28),a
	inc hl
	ld a,(hl)
	ld (ix+#19),a
	inc hl
	ld a,(hl)
	ld (ix+#1b),a
	inc hl
	ld a,(hl)
	ld (ix+#1e),a
	inc hl
	ld a,(hl)
	ld (ix+#11),a
	inc hl
	ld a,(hl)
	ld (ix+#12),a
	inc hl
	ld (ix+#14),h
	ld (ix+#13),l
	ld (ix+#10),#00
	ld de,#0010
	add hl,de
	ld a,(hl)
	ld (ix+#17),#00
	and a
	jp z,l4925
	ld b,a
	or #c0
	ld (l4381),a
	ld a,b
	bit 7,a
	jp z,l4925
	cpl
	and #38
	ld (ix+#17),a
.l4925
	inc hl
	ld a,(ix+#0f)
	cp #08
	jp nz,l4941
	ld a,(hl)
	ld (l42de),a
	and a
	jp z,l4941
	inc hl
	inc hl
	ld a,(hl)
	push hl
	ld h,#0d
	ld l,a
	call l4353
	pop hl
.l4941
	pop hl
	jp l4746
.l4945
	inc hl
	ld a,(hl)
	inc hl
	push hl
	add a
	add a
	add a
	ld h,#00
	ld l,a
	ld de,l4b64
	add hl,de
	ld (l42e0),hl
	pop hl
	jp l49b6
.l495a
	inc hl
	ld a,(hl)
	inc hl
	ld (ix+#2c),a
	jp l49b6
.l4963
	inc hl
	ld a,(hl)
	inc hl
	ld (ix+#2b),a
	jp l49b6
.l496c
	inc hl
	ld a,(hl)
	sub #0c
	inc hl
	ld (l43b2),a
	ld (l43e1),a
	ld (l4410),a
	jp l49b6
.l497d
	inc hl
	ld b,(hl)
	inc hl
	ld a,(ix+#2d)
	add b
	ld (ix+#2d),a
	jp l49b6
	ld (ix+#0c),#ff
	ld (ix+#03),#00
	ld (ix+#04),#00
	inc hl
	ld a,(hl)
	and a
	jp z,l45a2
	call l44ca
	jp l45a2
.l49a2
	call l49b0
	jp l4740
.l49a8
	pop bc
	jp l44ca
.l49ac
	pop bc
	jp l4417
.l49b0
	ld l,(ix+#20)
	ld h,(ix+#21)
.l49b6
	ld a,(hl)
	cp #f8
	jp z,l495a
	cp #f9
	jp z,l4963
	cp #f6
	jp z,l482f
	cp #fa
	jp z,l497d
	cp #fb
	jp z,l496c
	cp #fc
	jp z,l4945
	cp #fd
	jp z,l49ac
	cp #fe
	jr z,l4a08
	cp #ff
	jr z,l49a8
	push hl
	ld l,a
	ld h,#00
	add hl,hl
	ld de,l3f38
	add hl,de
	ld e,(hl)
	inc hl
	ld d,(hl)
	ld (ix+#00),e
	ld (ix+#01),d
	ld (ix+#15),e
	ld (ix+#16),d
	pop hl
	inc hl
	ld a,(hl)
	ld (ix+#22),a
	inc hl
	ld (ix+#20),l
	ld (ix+#21),h
	ret
.l4a08
	ld l,(ix+#23)
	ld h,(ix+#24)
	jr l49b6
.l4a14 equ $ + 4
	db #00,#00,#00,#00,#00,#00
	dw #0e18,#0d4d,#0c8e,#0bda
	dw #0b2f,#0a8f,#09f7,#0968
	dw #08e1,#0861,#07e9,#0777
	dw #070c,#06a7,#0647,#05ed
	dw #0598,#0547,#04fc,#04d4
	dw #0470,#0431,#03f4,#03dc
	dw #0386,#0353,#0324,#02f6
	dw #02cc,#02a4,#027e,#025a
	dw #0238,#0218,#01fa,#01de
	dw #01c3,#01aa,#0192,#017b
	dw #0166,#0152,#013f,#012d
	dw #011c,#010c,#00fd,#00ef
	dw #00e1,#00d5,#00c9,#00be
	dw #00b3,#00a9,#009f,#0096
	dw #008e,#0086,#007f,#0077
	dw #0071,#006a,#0064,#005f
	dw #0059,#0054,#0050,#004b
	dw #0047,#0043,#003f,#003c
	dw #0038,#0035,#0032,#002f
	dw #002d,#002a,#0028,#0026
	dw #0024,#0022,#0020,#001e
	dw #001c,#001b,#0019,#0018
	dw #0016,#0015,#0014,#0013
	dw #0012,#0011,#0010
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #6a,#00,#64,#00,#5e,#00,#5a,#00
	db #54,#00,#4f,#00,#4a,#00,#47,#00
	db #43,#00,#3f,#00,#3b,#00,#38,#00
	db #35,#00,#32,#00,#2f,#00,#2d,#00
	db #2a,#00,#28,#00,#25,#00,#23,#00
	db #21,#00,#20,#00,#1e,#00,#1c,#00
	db #1b,#00,#19,#00,#18,#00,#16,#00
	db #15,#00,#14,#00,#13,#00,#12,#00
	db #11,#00,#10,#00,#0f,#00,#0e,#00
	db #0d,#00,#0c,#00,#0b,#00,#0a,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
.l4b64
	db #02,#04,#06,#08,#0a,#0c,#0e,#10
	db #12,#14,#16,#18,#1a,#1c,#1e,#20
	db #22,#24,#26,#28,#2a,#2c,#2e,#30
	db #32,#34,#36,#38,#3a,#3c,#3e,#40
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
;
.game_name
	db "OutLaws",0
.game_year
	db "1990",0
.game_publisher
	db "Players",0
.music_author
	db "",0
.music_comment
	db "",0

	read "music_end_v1_0.asm" 
